package com.zretc.controller;

import com.zretc.entity.FilmRank;
import com.zretc.service.FilmRankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/front")
public class FrontFilmRankController {

    @Autowired
    private FilmRankService filmRankService;

    @GetMapping("/filmRankList")
    @ResponseBody
    public List<FilmRank> getFilmRankListByLimit() {

        List<FilmRank> filmRankListByLimit = filmRankService.getFilmRankListByLimit();

        return filmRankListByLimit;
    }
}
